package com.design.alex.proxy;

/**
 * @ClassName : RealImage
 * @Description : todo
 * @Author : Alex
 * @Date: 2020-02-17 17:56
 */
public class RealImage implements Image {
    private String fileName;

    public RealImage(String fileName) {
        this.fileName = fileName;
        loadFromDisk(fileName);
    }

    @Override
    public void display() {
        System.out.println("Displaying " + fileName);
    }

    private void loadFromDisk(String fileName) {
        System.out.println("Loading " + fileName);
    }
}
